<template>
  <div class="container">
    <IndexBoard />
    <StockList />
  </div>
</template>

<script setup>
import IndexBoard from './components/IndexBoard.vue'
import StockList from './components/StockList.vue'
import { useStockStore } from './store'
import { onMounted } from 'vue'

const stockStore = useStockStore()

onMounted(() => {
  // 初始化加载三大指数
  stockStore.initIndexes()
  // 开始定时更新数据
  stockStore.startAutoUpdate()
})
</script>

<style scoped>
.container {
  padding: 20px;
}
</style> 